package com.leha.mp.core.Utils;

import java.util.Calendar;
import java.util.Date;

public class TimeIndexHelper {
    public static Integer getCurrentTimeIndex() {
        //计算时间偏移
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date());
        Integer hours = cal.get(Calendar.HOUR_OF_DAY);
        Integer minis = cal.get(Calendar.MINUTE);
        return hours*2+(minis>30?1:0);
    }
}
